home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / X11R4 / cmds / X / ddx / Xmfbpmax / machine / pmreg.h < prev   
Encoding:
C/C++ Source or Header  |  1990-04-24  |  6.4 KB  |  265 lines

  1.  
  2.  /* @(#)pmreg.h        "@(#)pmreg.h    4.5    (ULTRIX)    11/17/88" */
  3.  
  4. /************************************************************************
  5.  *                                    *
  6.  *            Copyright (c) 1986 by                *
  7.  *        Digital Equipment Corporation, Maynard, MA        *
  8.  *            All rights reserved.                *
  9.  *                                    *
  10.  *   This software is furnished under a license and may be used and    *
  11.  *   copied  only  in accordance with the terms of such license and    *
  12.  *   with the  inclusion  of  the  above  copyright  notice.   This    *
  13.  *   software  or  any    other copies thereof may not be provided or    *
  14.  *   otherwise made available to any other person.  No title to and    *
  15.  *   ownership of the software is hereby transferred.            *
  16.  *                                    *
  17.  *   This software is  derived  from  software  received  from  the    *
  18.  *   University    of   California,   Berkeley,   and   from   Bell    *
  19.  *   Laboratories.  Use, duplication, or disclosure is  subject  to    *
  20.  *   restrictions  under  license  agreements  with  University  of    *
  21.  *   California and with AT&T.                        *
  22.  *                                    *
  23.  *   The information in this software is subject to change  without    *
  24.  *   notice  and should not be construed as a commitment by Digital    *
  25.  *   Equipment Corporation.                        *
  26.  *                                    *
  27.  *   Digital assumes no responsibility for the use  or    reliability    *
  28.  *   of its software on equipment which is not supplied by Digital.    *
  29.  *                                    *
  30.  ************************************************************************/
  31.  
  32. /***********************************************************************
  33.  *
  34.  * Modification History:
  35.  *
  36.  * 17-Nov-88  -- Vasudev K. Bhandarkar
  37.  *
  38.  *    Got rid of TTY definitions
  39.  *
  40.  * 14-Aug-86  -- refiey (Ali Rafieymehr)
  41.  *    Tablet support.
  42.  *
  43.  *  5-Aug-86  -- rafiey (Ali Rafieymehr)
  44.  *    Changes for real VAXstar bitmap graphics driver.
  45.  *
  46.  * 18-Jun-86  -- rafiey (Ali Rafieymehr)
  47.  *    Created this header file for the VAXstar monochrome display driver.
  48.  *    Derived from qvreg.h.
  49.  *
  50.  **********************************************************************/
  51.  
  52. /*
  53.  * VAXstar Monochrome definitions.
  54.  */
  55.  
  56. #define    SELF_TEST    'T'
  57. #define    INCREMENTAL    'R'
  58. #define    PROMPT        'D'
  59.  
  60. #define    MOUSE_ID    0x2
  61. #define TABLET_ID    0x4
  62.  
  63. #define START_FRAME    0x80        /* start of report frame bit */
  64. #define X_SIGN        0x10        /* sign bit for X */
  65. #define Y_SIGN        0x08        /* sign bit for Y */
  66.  
  67. #define    XOFFSET        212
  68. #define    YOFFSET         34
  69.  
  70. #define    UPDATE_POS    0x01
  71.  
  72. /*
  73.  * VAXstar interrupt controller register bits
  74.  *
  75.  */
  76.  
  77. #define SINT_VF        010
  78.  
  79. /*
  80.  * Cursor Command Register bits
  81.  *
  82.  */
  83.  
  84. #define    ENPA    0000001
  85. #define    FOPA    0000002
  86. #define    ENPB    0000004
  87. #define    FOPB    0000010
  88. #define XHAIR    0000020
  89. #define    XHCLP    0000040
  90. #define    XHCL1    0000100
  91. #define    XHWID    0000200
  92. #define    ENRG1    0000400
  93. #define    FORG1    0001000
  94. #define    ENRG2    0002000
  95. #define    FORG2    0004000
  96. #define    LODSA    0010000
  97. #define    VBHI    0020000
  98. #define    HSHI    0040000
  99. #define    TEST    0100000
  100.  
  101.  
  102. /*
  103.  * Line Prameter Register bits
  104.  *
  105.  */
  106.  
  107. #define    SER_KBD      000000
  108. #define    SER_POINTER  000001
  109. #define    SER_COMLINE  000002
  110. #define    SER_PRINTER  000003
  111. #define    SER_CHARW    000030
  112. #define    SER_STOP     000040
  113. #define    SER_PARENB   000100
  114. #define    SER_ODDPAR   000200
  115. #define    SER_SPEED    006000
  116. #define    SER_RXENAB   010000
  117.  
  118.  
  119. /*
  120.  * Mouse definitions
  121.  *
  122.  */
  123.  
  124. #define MOTION_BUFFER_SIZE 100
  125. #define    SELF_TEST    'T'
  126.  
  127. #define EVENT_T_LEFT_BUTTON    0x00
  128. #define EVENT_T_FRONT_BUTTON    0x01
  129. #define EVENT_T_RIGHT_BUTTON    0x02
  130. #define EVENT_T_BACK_BUTTON    0x04
  131.  
  132. /* puck buttons */
  133.  
  134. #define T_LEFT_BUTTON        0x02
  135. #define T_FRONT_BUTTON        0x04
  136. #define T_RIGHT_BUTTON        0x08
  137. #define T_BACK_BUTTON        0x10
  138.  
  139. /*
  140.  * Lk201 keyboard 
  141.  */
  142.  
  143. #define LK_DOWN     0x80
  144. #define LED_ALL     0x8f
  145. #define LK_KDOWN_ERROR    0x3d        /* key down on powerup error */
  146. #define LK_OUTPUT_ERROR    0xb5        /* keystrokes lost during inhibit */
  147. #define LK_LOWEST    0x56        /* lowest significant keycode */
  148. #define LK_DIV6_START    0xad        /* start of div 6 */
  149. #define LK_DIV5_END    0xb2        /* end of div 5 */
  150.  
  151. /*
  152.  * Keycodes for special keys and functions
  153.  */
  154.  
  155. #define SHIFT    0xae
  156. #define LOCK    0xb0
  157. #define REPEAT    0xb4
  158. #define CNTRL    0xaf
  159. #define ALLUP    0xb3
  160. #define    HOLD    0x56
  161.  
  162. #define    CONSOLEMAJOR    0
  163. #define    PM_MAJOR    10
  164. #define CONS_DEV    0x01
  165. #define GRAPHIC_DEV    0x02
  166.  
  167. /********************************************************
  168.  *                            *
  169.  *  These are the physical registers in the memory map    *
  170.  *                            *
  171.  ********************************************************/
  172. #define SERIAL_REG    0x1c000000
  173. #define CURSOR_REG    0x11000000
  174. #define FRAME_BUF    0x0fc00000
  175. #define VDAC_REG    0x12000000
  176. #define PLANE_REG    0x10000000
  177.  
  178. /********************************************************
  179.  * Following allow pmputc to function in        *
  180.  * in physical mode (during a crash dump).        *
  181.  * One way transition, can't go back to virtual.    *
  182.  ********************************************************/
  183. #define KEYBD_BASE (*(struct cn_reg*)PHYS_TO_K1(SERIAL_REG))
  184. #define KEYBD_ADDR &KEYBD_BASE
  185. #define PCC_BASE (*(struct pcc_regs*)PHYS_TO_K1(CURSOR_REG))
  186. #define PCC_ADDR &PCC_BASE
  187. #define BITMAP_BASE (*(u_int *)PHYS_TO_K1(FRAME_BUF))
  188. #define BITMAP_ADDR &BITMAP_BASE
  189. #define VDAC_BASE (*(vdac_regs *)PHYS_TO_K1(VDAC_REG))
  190. #define VDAC_ADDR &VDAC_BASE
  191. #define PLANE (*(short *)PHYS_TO_K1(PLANE_REG))
  192. #define PLANE_ADDR &PLANE
  193.  
  194. struct pcc_regs {
  195.         u_short     cmdr;   /* 0 */
  196.     u_short        pad1;
  197.     u_short     xpos;   /* 1 */
  198.     u_short        pad2;
  199.     u_short     ypos;   /* 2 */
  200.     u_short        pad3;
  201.     u_short     xmin1;  /* 3 */
  202.     u_short        pad4;
  203.     u_short     xmax1;  /* 4 */
  204.     u_short        pad5;
  205.     u_short     ymin1;  /* 5 */
  206.     u_short        pad6;
  207.     u_short     ymax1;  /* 6 */
  208.     u_short        pad7;
  209.     u_short         unused7; /* 7 */
  210.     u_short         padunused7; 
  211.     u_short         unused8; /* 8 */
  212.     u_short         padunused8; 
  213.     u_short         unused9; /* 9 */
  214.     u_short         padunused9; 
  215.     u_short         unusedA; /* A */
  216.     u_short         padunusedA; 
  217.     u_short      xmin2;   /* B */
  218.     u_short        pad8;
  219.     u_short        xmax2;   /* C */
  220.     u_short        pad9;
  221.     u_short        ymin2;   /* D */
  222.     u_short        pada;
  223.     u_short        ymax2;   /* E */
  224.     u_short        padb;
  225.     u_short     memory;  /* F */
  226.     u_short        padc;
  227. };
  228.  
  229. /*  structure declaration for VDAC, regs aligned on word boundries */
  230.  
  231. typedef volatile struct {
  232.     u_char   map_wr;
  233.     u_char   pad0;
  234.     u_short  pad1;
  235.  
  236.     u_char   map_ram;
  237.     u_char   pad2;
  238.     u_short  pad3;
  239.  
  240.     u_char   mask;
  241.     u_char   pad4;
  242.     u_short  pad5;
  243.  
  244.     u_char   map_rd;
  245.     u_char   pad6;
  246.     u_short  pad7;
  247.  
  248.     u_char   over_wr;
  249.     u_char   pad8;
  250.     u_short  pad9;
  251.  
  252.     u_char   over_regs;
  253.     u_char   pad10;
  254.     u_short  pad11;
  255.  
  256.     u_char   reserved;
  257.     u_char   pad12;
  258.     u_short  pad13;
  259.  
  260.     u_char   over_rd;
  261.     u_char   pad14;
  262.     u_short  pad15;
  263. }vdac_regs ;
  264.  
  265.